﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Reflection;

namespace Comm
{
    public class Config
    {
        public static string PMS
        {
            get
            {
                return System.Configuration.ConfigurationManager.ConnectionStrings["PMS"].ConnectionString;
            }
        }

        public static int CacheDefaultTime
        {
            get
            {
                string time = System.Configuration.ConfigurationManager.ConnectionStrings["CacheDefaultTime"].ConnectionString;
                if (!string.IsNullOrEmpty(time))
                {
                    return Convert.ToInt32(time);
                }
                else
                {
                    return 5;
                }
            }
        }

        public static string UploadPath
        {
            get
            {
                return System.Configuration.ConfigurationManager.ConnectionStrings["UploadPath"].ConnectionString;
            }
        }

        public static string BaseDirectory
        {
            get
            {
                return System.AppDomain.CurrentDomain.BaseDirectory;
            }
        }
    }
}
